home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / varia / silo.lha / silo / Bin.h < prev    next >
C/C++ Source or Header  |  1993-08-08  |  671b  |  36 lines

  1. /* $Author: ecsv38 $ $Date: 90/08/21 14:46:17 $ $Revision: 1.1 $ */
  2. /* (c) S. Manoharan  sam@lfcs.edinburgh.ac.uk */
  3.  
  4. #ifndef Bin_H
  5. #define Bin_H
  6.  
  7. #include "Entity.h"
  8. #include "SimEntityList.h"
  9.  
  10. class Bin {
  11. private:
  12.    char *bin_name;
  13.    int available;
  14.    short bin_used;
  15.    SimEntityList blockedQ;
  16. public:
  17.    Bin(const int = 0, char *const s = 0);
  18.    virtual ~Bin()    { }
  19.  
  20.    virtual void set(const int sz);
  21.    virtual short status()    { return available == 0; }
  22.  
  23.    virtual short take(Entity *const bywho, const int event_type);
  24.    virtual void give();
  25. };
  26.  
  27. inline
  28. Bin::Bin(const int sz, char *const s)
  29. {
  30.    available = sz;
  31.    bin_name = s;
  32.    bin_used = 0;
  33. }
  34.  
  35. #endif Bin_H
  36.